const { filterByKeyword } = require('../../../common/utils/searchUtil');
const { doOrderPlugin } = require('./doOrderPlugin');


exports.doSearchByFolder = async function (request) {
    const keyword = request.input
    let resultList = []
    resultList.push(
        {
            "name": "测试插件",
            "pluginUUID": "321321",
            "desc": "测试插件",
            "type": "plugin"
        }

    )

    return {
        preSearch: null,
        resultList: doOrderAndFilterPLugin(plugins, request)

    }
}




function doOrderAndFilterPLugin(plugins, request) {
    plugins = filterByKeyword(plugins, null)
    plugins = doOrderPlugin(plugins)
    return plugins
}
